<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>Document</title>
  <script src="lib/vue.js"></script>
</head>
<body>
  <div id="root">
    <ul>
      <li v-for="item of list" :key="item" v-if="true">
        {{ item }}
      </li>
    </ul>
    <div>{{ obj }}</div>
  </div>
</body>
<script>
  const vm = new Vue({
    el: '#root',
    data: {
      list: ['a', 'b', 'c', 'd'],
      obj: {
        x: 100
      }
    },
    mounted () {
      setTimeout(() => {
        this.obj.x = 300
        this.obj.y = 400
      }, 3000) 
    }
  })

  // vm.list[0] = 'aaaa' // vue2中不能通过数组的下标更改数组的内容
  // vm.list.length = 0 // vue2中不能通过设置数组的长度为0 让数组清空数据

  
</script>
</html>